import React, { memo } from 'react'
import { Provider } from 'react-redux'
import { renderRoutes } from 'react-router-config'

import routes from './router'
import store from './store'

import WYAppHeader from "@/components/app-header"
import WYAppFooter from "@/components/app-footer"
import AppPlayerBar from "@/pages/player/app-player-bar"
import { HashRouter } from "react-router-dom"

export default memo(function App() {
  return (
    <Provider store={store}>  
      <HashRouter>
        <WYAppHeader/>
        {renderRoutes(routes)}
        <WYAppFooter/>
        <AppPlayerBar />
      </HashRouter>
    </Provider>
  )
})